from django.conf.urls import url
from django.urls import path, re_path
from . import views

urlpatterns = [

    # 5.首页房源推荐 GET
    path('api/v1.0/houses/index/', views.IndexListView.as_view()),

    # 6.首页房源搜索 GET
    path('api/v1.0/houses/search/', views.SearchView.as_view()),

    # 发布新房源
    path('api/v1.0/houses/', views.IssueHouseView.as_view()),

    # 上传房源图片
    path('api/v1.0/houses/<int:house_id>/images/', views.HouseImageView.as_view()),
    # re_path(r'^api/v1.0/houses/(?P<house_id>\d+)/images/$', views.HouseImageView.as_view()),
    # url(r'^api/v1.0/houses/(?P<house_id>\d+)/images/$', views.HouseImageView.as_view()),

    # 房屋详情信息
    path('api/v1.0/houses/<int:house_id>/', views.DetailView.as_view()),
]
